package com.sixth.system.mapper;/**
 * @author 633yh
 * @version 1.0
 */

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sixth.core.entity.LoginInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author     ：Stu YH
 * @date       ：Created in 2024/8/18 19:17
 * @description：
 * @modified By：
 * @version:
 */
@Mapper
public interface LoginInfoMapper extends BaseMapper<LoginInfo> {
        @Delete("delete from sys_login_info")
        void deleteAll();

        @Insert("INSERT INTO sys_login_info (user_name, login_account, ip_addr, login_location, browser, os, login_status, login_type, msg, login_time) " +
                "VALUES (#{userName}, #{loginAccount}, #{ipAddr}, #{loginLocation}, #{browser}, #{os}, #{loginStatus}, #{loginType}, #{msg}, #{loginTime})")
        int insert(LoginInfo loginInfo);
    }